package cn.chaohi.common.domain.cloudstorage.order;


/**
 * 订单详情数据对象.
 * 
 * @author bobo
 *
 */
public class OrderDetail {

	/**
	 * 详情ID
	 */
	private Integer detail_id;
	/**
	 * 商品名称.
	 */
	private String goods_name;
	/**
	 * 商品数量.
	 */
	private Integer goods_count;
	/**
	 * 小计金额.
	 */
	private String sub_price;
	/**
	 * 优惠后小计金额.
	 */
	private String sale_price;
	/**
	 * 单位.
	 */
	private String units;
	
	/**
	 * 退货类型 1 按个退  2整体退
	 */
	private Integer cancel_type = 0;
	/**
	 * 退货数量
	 */
	private Integer cancel_num = 0;
	/**
	 * 可退货数量
	 */
	private Integer cancel_status = 0;
	/**
	 * 可退货数量
	 */
	private Integer can_cancel_num = 0;
	public OrderDetail() {
		super();
	}

	public Integer getDetail_id() {
		return detail_id;
	}

	public void setDetail_id(Integer detail_id) {
		this.detail_id = detail_id;
	}

	public String getGoods_name() {
		return goods_name;
	}

	public void setGoods_name(String goods_name) {
		this.goods_name = goods_name;
	}

	public Integer getGoods_count() {
		return goods_count;
	}

	public void setGoods_count(Integer goods_count) {
		this.goods_count = goods_count;
	}
	public String getSub_price() {
		return sub_price;
	}
	public void setSub_price(String sub_price) {
		this.sub_price = sub_price;
	}
	
	public String getSale_price() {
		return sale_price;
	}

	public void setSale_price(String sale_price) {
		this.sale_price = sale_price;
	}

	public String getUnits() {
		return units;
	}
	public void setUnits(String units) {
		this.units = units;
	}

	public Integer getCancel_type() {
		return cancel_type;
	}

	public void setCancel_type(Integer cancel_type) {
		this.cancel_type = cancel_type;
	}

	public Integer getCancel_num() {
		return cancel_num;
	}

	public void setCancel_num(Integer cancel_num) {
		this.cancel_num = cancel_num;
	}

	public Integer getCancel_status() {
		return cancel_status;
	}

	public void setCancel_status(Integer cancel_status) {
		this.cancel_status = cancel_status;
	}

	public Integer getCan_cancel_num() {
		this.can_cancel_num = this.goods_count - this.cancel_num;
		return can_cancel_num;
	}

	public void setCan_cancel_num(Integer can_cancel_num) {
		this.can_cancel_num = can_cancel_num;
	}

}
